<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="java.util.*" %>
<%@ page import="com.ionglobal.db.*" %>
<%@ page import="com.ionglobal.lib.*" %>
<%@ page import="com.ionglobal.misc.*" %>
<%@ page import="com.ionglobal.project.*" %>
<%@ include file="init_include.jsp" %>
<script language="javascript">
<!--
	function OpenWin(sURL) {
		var newwindow = window.open(sURL,"","menubar=no,toolbar=no,scrollbars=yes,width=600,height=500,status=0,left=100,top=50");
		newwindow.focus();
	}
-->
</script>
<%
	OnLineUser.RefreshUser();
	String username="";
	int LoginId=Request.getInt("LoginId");
	if(request.getParameter("username")!=null) 
		username=request.getParameter("username");
	else {
		Sysop sysop=(Sysop)session.getAttribute("sysop");
		if ( sysop==null) {
			response.sendRedirect("logout.jsp?LoginId="+LoginId);
			return;		
		}	 else {
			username=sysop.getName();
			LoginId=sysop.getLoginId();		
		}
	}		
	OnLineUser.AddUserName(username,request.getRemoteAddr());
	
	TaskApp ta=new TaskApp();
	
	String idstr=Request.getString("idstr","");
	if(idstr!=null && idstr.length()>0) {
		idstr=ta.getUserUnFinishTask(dbi,username,idstr);
		if(idstr!=null && idstr.length()>0) {
			String[] id=StringUtil.split(idstr,',');
			out.print("<script language=\"javascript\">");
			for(int i=0;i<id.length;i++) {
				out.print("OpenWin(\"./project/Task_view.jsp?catid=51&id="+id[i]+"\")");
			}
			out.print("</script>");
		}
	}	else 
		idstr=ta.getUserUnFinishTask(dbi,username,idstr);
//	int userNum=OnLineUser.getUserNum();
	%>
<meta http-equiv="refresh" content="240;URL="onlineuser.jsp?username=<%=username%>&LoginId=<%=LoginId%>&idstr=<%=idstr%>">
<%@ include file="init_free.jsp" %>

